<li class="dropdown">
<a href="#" data-toggle="dropdown" class="dropdown-toggle"> <i class="icon-download icon-white"></i> CRUD <span class="caret"></span></a>
<ul class="dropdown-menu">
<li class="dropdown-submenu"> <a href="#" class="dropdown-toggle"><span> System </span></a> <ul class="dropdown-menu">
  <li><a href="{{ URL::to('/admin/system/database') }}"><i class="icon-tasks"></i> Database </a></li>
  <li><a href="{{ URL::to('/admin/system/console') }}"><i class="icon-tasks"></i> Console </a></li>
  <li><a href="{{ URL::to('/nd/master/domain') }}"><i class="icon-tasks"></i> Domain </a></li>
</ul></li>
<li><a href="{{ URL::to('/sfm') }}"><i class="icon-tasks"></i> File Manager </a></li>
<li class="divider"></li>
<?php
  $base_path=Request::getBasePath();$base_path=preg_replace('/\/$/', '', $base_path);
  $cruds = array(
    'Customer' => [
       (object)array('name'=>'Customer',               'url'=>$base_path.'/car_balance/manage/customer')
      ,(object)array('name'=>'Customer Bill Type',     'url'=>$base_path.'/car_balance/manage/customerBillType')
    ]
    ,'Car Auction' => [
       (object)array('name'=>'Car Auction',            'url'=>$base_path.'/car_balance/manage/car_auction')
      ,(object)array('name'=>'Car Auction Type',       'url'=>$base_path.'/car_balance/manage/car_auction_type')
      ,(object)array('name'=>'Fax Account',            'url'=>$base_path.'/car_balance/manage/fax_account')
    ]
    ,'Service' => [
       (object)array('name'=>'Service Company',        'url'=>$base_path.'/car_balance/manage/service_company')
      ,(object)array('name'=>'Transport Company',      'url'=>$base_path.'/car_balance/manage/transport_company')
      ,(object)array('name'=>'Vanning Company',        'url'=>$base_path.'/car_balance/manage/vanning_company')
      ,(object)array('name'=>'Vanning Branch',         'url'=>$base_path.'/car_balance/manage/vanning_company_branch')
    ]
    ,'Bank' => [
       (object)array('name'=>'Bank',                   'url'=>$base_path.'/car_balance/manage/bank')
      ,(object)array('name'=>'Bank Account',           'url'=>$base_path.'/car_balance/manage/bank_account')
      ,(object)array('name'=>'Exchange Rate',          'url'=>$base_path.'/car_balance/manage/exchange_rate')
    ]
    ,'Car Master' => [
       (object)array('name'=>'Car Makers',             'url'=>$base_path.'/car_balance/manage/carmaker')
    ]
    ,''
    ,(object)array('name'=>'Transport Fee Pay',      'url'=>$base_path.'/car_balance/manage/transport_fee_pay')
    ,(object)array('name'=>'Re Auction',             'url'=>$base_path.'/car_balance/manage/re_auction')
/*
    ,'Ems' => [
       (object)array('name'=>'Ems',                    'url'=>$base_path.'/car_balance/manage/ems')
      ,(object)array('name'=>'Ems Content',            'url'=>$base_path.'/car_balance/manage/ems_content')
    ]
    ,(object)array('name'=>'Parts',                  'url'=>$base_path.'/car_balance/manage/parts')
    ,(object)array('name'=>'Container',              'url'=>$base_path.'/car_balance/manage/container')
*/
  );
?>
@foreach($cruds as $k=>$va)
@if (is_array($va))
<li class="dropdown-submenu"> <a href="#" class="dropdown-toggle"><span> {{ $k }} </span></a> <ul class="dropdown-menu">
@foreach($va as $v)
<li><a href="{{ $v->url }}"><i class="icon-list"></i> {{ $v->name }}</a></li>
@endforeach
</ul> </li>
@elseif (empty($k))
<li class="divider"></li>
@else
<li><a href="{{ $va->url }}"><i class="icon-list"></i> {{ $va->name }}</a></li>
@endif
@endforeach
</ul>
</li>
